<div class="requirement-editor">
    <form class="w-sdc-form">
        <div class="i-sdc-form-content-requirement-content">
            <div class="content-row">
                <div class="i-sdc-form-item">
                    <sdc-input
                            label="{{ 'REQ_NAME' | translate}}"
                            required="true"
                            testId="reqName"
                            [disabled]="isReadonly"
                            [(value)]="requirementData.name"
                            (valueChange)="validityChanged()">
                    </sdc-input>
                </div>
            </div>

            <div class="group-with-border">
                <div class="content-row i-sdc-form-item">
                    <sdc-dropdown
                            label="{{ 'REQ_RELATED_CAPABILITY' | translate }}"
                            testId="reqRelatedCapability"
                            required="true"
                            [disabled]="isReadonly"
                            [options]="capabilityTypesMappedList"
                            selectedOption="{{requirementData.capability}}"
                            [placeHolder] = "requirementData.capability"
                            (changed)="onCapabilityChanged($event)">
                    </sdc-dropdown>
                </div>
                <div class="content-row i-sdc-form-item">
                    <sdc-dropdown
                            label="{{ 'REQ_NODE' | translate }}"
                            testId="reqNode"
                            [disabled]="isReadonly"
                            [options]="nodeTypesMappedList"
                            selectedOption="{{requirementData.node}}"
                            [placeHolder] = "requirementData.node"
                            (changed)="onNodeChanged($event)">
                    </sdc-dropdown>
                </div>
                <div class="content-row i-sdc-form-item">
                    <sdc-dropdown
                            label="{{ 'REQ_RELATIONSHIP' | translate }}"
                            testId="reqRelationship"
                            [disabled]="isReadonly"
                            [options]="relationshipTypesMappedList"
                            selectedOption="{{requirementData.relationship}}"
                            [placeHolder] = "requirementData.relationship"
                            (changed)="onRelationshipChanged($event)">
                    </sdc-dropdown>
                </div>
            </div>

            <label class="i-sdc-form-label occurrences-label"> {{ 'REQ_CAP_OCCURRENCES' | translate}} </label>
            <div class="content-row occurrences-section">
                <div class="min-occurrences-value">
                    <sdc-input
                            label="{{ 'REQ_CAP_OCCURRENCES_MIN' | translate}}"
                            testId="reqOccurrencesMin"
                            [disabled]="isReadonly"
                            [(value)]="requirementData.minOccurrences"
                            (valueChange)="validityChanged()"
                            type="number">
                    </sdc-input>
                </div>
                <div class="sdc-input">
                    <label class="sdc-input__label"> {{ 'REQ_CAP_OCCURRENCES_MAX' | translate}} </label>
                    <div class="max-occurrences-value">
                        <sdc-checkbox
                                class="checkbox-label unbounded-value"
                                testId="reqOccurrencesMaxUnbounded"
                                label="{{translatedUnboundTxt.toLowerCase()}}"
                                (checkedChange)="onUnboundedChanged()"
                                [checked]="isUnboundedChecked"
                                [disabled]="isReadonly">
                        </sdc-checkbox>
                        <sdc-input
                                *ngIf="!isUnboundedChecked"
                                testId="reqOccurrencesMax"
                                [disabled]="isReadonly"
                                [(value)]="requirementData.maxOccurrences"
                                (valueChange)="validityChanged()"
                                type="number">
                        </sdc-input>
                    </div>

                </div>
            </div>
        </div>
    </form>
</div>